﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Netium.Compiler
{
    [Serializable]
    public class DuplicatedEntryException : Exception
    {
        private string _entryName;
        public DuplicatedEntryException()
            : base()
        {
        }

        public DuplicatedEntryException(string entryName)
            : base()
        {
            EntryName = entryName;
        }

        public DuplicatedEntryException(string entryName, string message)
            : base(message)
        {
            EntryName = entryName;
        }

        public DuplicatedEntryException(string entryName, string message, Exception innerException)
            : base(message, innerException)
        {
            EntryName = entryName;
        }

        public string EntryName
        {
            get { return _entryName; }
            set { _entryName = value ?? string.Empty; }
        }

        public override void GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context)
        {
            base.GetObjectData(info, context);
        }
    }
}
